﻿<!DOCTYPE html>
<!--上锁挂签清单-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <link href="../static/js/vue-treeselect/vue-treeselect.css" rel="stylesheet" />
    <script src="../static/js/vue-treeselect/vue-treeselect.js"></script>
    <style>
        .el-table--enable-row-hover .el-table__body tr:hover > td {
            border-color: black;
        }

        .el-table--border td, .el-table--border th, .el-table__body-wrapper .el-table--border.is-scrolling-left ~ .el-table__fixed {
            border-color: black;
        }

        .el-table td, .el-table th.is-leaf {
            border-color: black;
        }
        .vue-treeselect__control {
            height: 100%;
            border: none;
            background: none;
        }

        .vue-treeselect__placeholder {
            top: -3px;
        }

        .vue-treeselect__single-value {
            top: -3px;
        }
        body {
            padding-bottom: 10px;
        }

        .el-input__inner{
            color: #606266!important
        }
        td{
            padding: 10px
        }
    </style>
</head>
<body>
    
<div id="app" v-cloak>   
        <div style="width:100%;text-align:center ">
            <label style="font-weight:bold">上锁挂签清单</label>
        </div>
        <table style="width:100%">
            <tr>
                <td width="40%" style="text-align:right ">{{LockedCheck.ReportTime+mark.m}} {{Form.ReportTime}}  </td>
                <td width="60%" style="text-align:right "> {{LockedCheck.SignNumber+mark.m}} {{Form.SignNumber}}  </td>
            </tr>
        </table>
        <el-form :model="Form" status-icon style="margin-top:5px;width:100%"class="safeCard">



            <!--作业单位 属地单位 --> <!--作业区域 作业位置-->   <!--     附管线（设备）打开JSA：-->  <!--承包商 等级-->     <!--危害识别-->
            <table style="border:1px  solid; width:100%" cellpadding="0" cellspacing="0">
                <!--作业单位 属地单位 -->
                <tr style="border:1px  solid;">

                    <td width="50%" style="border-right:1px solid;border-bottom:1px solid  ">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input size="mini">
                                    <template slot="prepend">
                                        <div>{{LockedCheck.TerritorialDepartment+mark.m}}</div>
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="Form.TerritorialDepartment" slot="suffix" :placeholder="PipelineOpenOperationSafetyLicense.TerritorialDepartment">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in TerritorialDepartment" :label="item.value" :value="item.key">
                                        </el-option>
                                    </el-select>
                                </el-input>
                            </el-form-item>
                        </div>
                    </td>
                    <td width="50%" style="border-bottom:1px solid  ">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input size="mini">
                                    <template slot="prepend">
                                        <div>{{LockedCheck.OperatingUnit+mark.m}}</div>
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="Form.OperatingUnit" slot="suffix" :placeholder="PipelineOpenOperationSafetyLicense.OperatingUnit">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in OperatingUnit" :label="item.value" :value="item.key">
                                        </el-option>
                                    </el-select>
                                </el-input>
                            </el-form-item>
                        </div>
                    </td>

                </tr>

                <!--作业区域 作业位置-->
                <tr>
                    <td width="50%" style="border-bottom:1px solid; border-right:1px solid">
                        <div class="elst-select-mini">
                            <el-form-item>
                                <el-input size="mini">
                                    <template slot="prepend">
                                        <div>{{LockedCheck.WorkingArea+mark.m}}</div>
                                    </template>
                                    <el-select @visible-change="visibleChange" v-model="Form.WorkingArea" slot="suffix" :placeholder="SimpleLiftingOperation.WorkingArea">
                                        <el-option label="请选择" value=""></el-option>
                                        <el-option v-for="item in WorkingArea" :label="item.value" :value="item.key">
                                        </el-option>
                                    </el-select>
                                </el-input>
                            </el-form-item>
                        </div>
                    </td>
                    <td width="50%" style="border-bottom:1px solid;padding-left:10px " colspan="2">
                        <el-form-item :label="LockedCheck.WorkingTime+mark.m" class="inputTextarea">
                            <!-- 弹出页的其它不能成组的控件添加class="inputTextarea"，达到label与input、select等控件的label对齐的目的 -->
                            <el-date-picker v-model="Form.WorkingTime" value-format="yyyy-MM-dd" type="date"
                                            placeholder="选择日期">
                            </el-date-picker>
                        </el-form-item>
                    </td>
                </tr>

                <!--作业描述-->
                <tr>
                    <td width="100%" colspan="2" style="border-bottom:1px solid;padding-left:10px">
                        <el-form-item :label="LockedCheck.WorkContent+mark.m">
                            <el-input type="textarea" style="width:90%;margin-top:3px;border:none" v-model="Form.WorkContent"></el-input>
                        </el-form-item>
                    </td>
                </tr>
                <tr>
                    <td width="100%" colspan="2" style="padding-left:10px">
                        <el-form-item :label="LockedCheck.IsolationSystem+mark.m">
                            <el-input type="textarea" style="width:85%;margin-top:3px;border:none" v-model="Form.IsolationSystem"></el-input>
                        </el-form-item>
                    </td>
                </tr>
            </table>
            <el-row style="border:1px  solid #000000; border-top:0px;   ">
                <el-col span="24">
                    <el-table :data="Form.HazardousList"
                              border
                              style="width: 100%">
                        <el-table-column prop="HazardousEnergy"
                                         :label="LockedCheck.HazardousEnergy" style="border-color:red;">
                        </el-table-column>
                        <el-table-column prop="Harm"
                                         :label="LockedCheck.Harm">
                        </el-table-column>
                        <el-table-column prop="IsolationMethod"
                                         :label="LockedCheck.IsolationMethod">
                        </el-table-column>
                        <el-table-column prop="IsolationPoint"
                                         :label="LockedCheck.IsolationPoint">
                        </el-table-column>
                        <el-table-column prop="LockedSigner"
                                         :label="LockedCheck.LockedSigner">
                        </el-table-column>

                        <!--<el-table-column align="right">
                        <template slot="header" slot-scope="scope">
                            <el-button type="primary" @click="UserInput('xg')">{{col.btnAdd}}</el-button>
                        </template>

                        <template slot-scope="scope">
                            <el-button @click.native.prevent="deleteRow(scope.$index, Form.AffectedPartiesUnit)"
                                       type="text"
                                       size="small">
                                移除
                            </el-button>
                        </template>
                    </el-table-column>-->
                    </el-table>
                </el-col>
            </el-row>
            <table style="border:1px  solid; width:100%; border-top:0px solid" cellpadding="0" cellspacing="0">
                <tr style="border:1px  solid;">
                    <td width="30%" style="border-bottom:1px solid ;padding-left:20px ">

                        {{LockedCheck.IdentifyPeople+mark.m}}
                    </td>
                    <td width="70%" style="border-bottom:1px solid  ">

                        <signature v-model="SignValue" :disable="false"></signature>
                    </td>
                </tr>
                <tr style="border:1px  solid;">
                    <td width="30%" style="padding-left:20px">
                        {{LockedCheck.Approver+mark.m}}

                    <td width="70%">
                        <signature v-model="SignValue" :disable="false"></signature>
                    </td>

                </tr>
            </table>
            <el-row>
                <el-form-item style="text-align:center; padding-top:5px">

                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog title="" :visible.sync="ListItem.dialogVisible" width="90%" height="95%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
        Vue.component('treeselect', VueTreeselect.Treeselect)
        app = new Vue({
            el: '#app',
            data: {
                id: '',
                SignValue: '',
                Form: {
                    id: guidEmpty,
                    TerritorialDepartment: "",
                    OperatingUnit: "",
                    WorkingArea: "",
                    WorkingTime: "",
                    WorkContent: "",
                    IsolationSystem: "",
                    HazardousEnergy: "",
                    HazardousList: [],
                    IsolationMethod: "",
                    IsolationPoint: "",
                    LockedSigner: "",
                    IdentifyPeople: "",
                    Approver: "",
                    ReportTime: "",
                    SignNumber: "",
                },
                TerritorialDepartment: [],
                OperatingUnit: [],
                WorkingArea: {},
                mydata: PersonInChargeTree,
                PersonInCharge: [],
                ListItem: ListItem,
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                handleChange: function (value) {
                    console.log(value);
                },
                handleSelect: function (ev) {
                    console.log(ev);
                },
                handleChecked: function (value) {
                },
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
                getData: function () {
                    getDataAdd(this, '/api/LockedCheck/get?id=' + this.id);
                },
                UserInput: function (val, id) {

                    DialogShow(this, val, "HazardousEnergInput.html", this.id);
                },

                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    console.log(mythis)
                    //this.$refs[formName].validate(function (valid) {
                    //    //验证通过
                    //    if (valid) {
                    onSubmitForm(this, '/api/LockedCheck/Save', mythis.Form);
                    //} else {
                    //    //验证失败
                    //    return false;
                    //}
                    //});
                },
            },
            mounted: function () {
                this.PersonInCharge = fn(this.mydata, "0");
                var list = getDicDataArray(['14', '08', '97']);
                this.OperatingUnit = getDicDatafromArray('08', list);//
                this.TerritorialDepartment = getDicDatafromArray('14', list);//
                this.WorkingArea = getDicDatafromArray('97', list);
                this.id = getUrlParam("id");
                this.getData();
                //this.BasedDatabaseManagementRequirements = this.Form.BasedDatabaseManagementRequirements;
            }
        });
    </script>
</body>
</html>